var money = {
    message:'select id from m_message where userId = ? and type = ?',
    messageList:'select * from m_message where userId = ? and type = ?',
    findMessage:'SELECT m_message.id, m_message.userId, m_message.relationshipId, m_message.state, m_message.type, m_relationship.payUserId, m_relationship.collectUserId FROM m_message INNER JOIN m_relationship ON m_message.relationshipId = m_relationship.id WHERE m_message.id = ?',
    isMessage:'update m_message set type = 2 where id = ?',
    addMessage:'INSERT INTO m_message(userId, relationshipId, message, state, create_time) VALUES(?,?,?,?,?)',
    isRelationship:'update m_relationship set state = ? where id = ?',
    okMessage:'update m_message set type = 2 where id = ? and userId = ?',
    list: 'select * from m_relationship where payUserId = ? or collectUserId = ? and state = ?',
    userId:'select userId from m_user where userId = ?',

    relationshipFind: 'SELECT userId,userName,nickName FROM m_user WHERE userName LIKE ? and userName != ?',
    relationshipAddFind: 'select id from m_relationship where payUserId = ? and collectUserId = ?',
    relationshipInfo: 'select * from m_relationship where id = ? and state = 1',
    relationshipAdd: 'INSERT INTO m_relationship(payUserId, collectUserId, create_time) VALUES(?,?,?)',
    relationshipMoneyFind: 'select * from m_relationship where id = ? and state = 1',
    relationshipMoney: 'update m_relationship set payMoney = ?, collectMoney = ?, money = ? where id = ?',

};

module.exports = money;